package ar.pegasus.webcam;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenuItem;
import javax.swing.JPanel;

/**
 *
 * @author oarias
 */
public class JMenuFormato extends JMenuItem implements ActionListener{
	private static final long serialVersionUID = -1050550465828938623L;
	
	private int ancho;
    private int alto;
    private JPanel modificable;
    private IFrmCapturaImagen padre;

    public JMenuFormato(String etiqueta,int ancho,int alto,IFrmCapturaImagen padre2,JPanel modificable)
    {
        super(etiqueta);
        setModificable(modificable);
        this.ancho=ancho;
        this.alto=alto;
        this.addActionListener(this);
        this.padre=padre2;
    }

    public void actionPerformed(ActionEvent e) {
       padre.setSize(ancho, alto+200);
    }

	public void setModificable(JPanel modificable) {
		this.modificable = modificable;
	}

	public JPanel getModificable() {
		return modificable;
	}
}